<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>{$title} - <tp:sitename /></title>
    <meta name="keywords" content="{$keywords}" />
    <meta name="description" content="{$description}" />
    <link rel="shortcut icon" href="__PUBLIC__/images/favicon.ico" type="image/x-icon" /> 
    <link rel="stylesheet" href="__PUBLIC__/css/style_version1.css" type="text/css" />
    <link href="__PUBLIC__/css/member.css" rel="stylesheet" type="text/css" />
    <script src="__PUBLIC__/js/jquery.js" type="text/javascript"></script>
</head> 
<body> 

<include file="Public:header" />

<div class="container clearfix">
    
    <include file="Member:left" />
    
    <div class="member_main">
        <div class="perInfo">
            <div class="titleInfoBorder">
                <span>我的设置</span>
            </div>
            <div class="firstTabBox lineSpace">
            	<a class="tab" href="{:U('Member/person')}">个人资料</a>
                <span class="line">|</span>
                <a class="tab currentTab" href="{:U('Member/avatar')}">头像设置</a>
                <span class="line">|</span>
                <a class="tab" href="{:U('Member/email')}">邮箱验证</a>
                <span class="line">|</span>
                <a class="tab" href="{:U('Member/password')}">修改密码</a>
            </div>
        </div>
        <div class="setting-right-wrap wrap-boxes settings" id="avatar_main">

            <div class="form">
            <form method="post" enctype="multipart/form-data" id="upForm" action="{:U('Member/avatar')}">
                <dl>
                    <dt>当前头像：</dt>
                    <dd>
                    	<if condition="$user['face']"><img src="{$user.face}" /><else /><img src="__AVATAR__/system/0.gif" /></if>
                    </dd>
                </dl>
                <dl>
                    <!--<dt style=" height:47px; line-height:47px;">上传头像：</dt>-->
                    <dd>
                            <div id="altContent" ></div>
                            <input type="hidden" name="path" id="path" />
                        
                    </dd>
                    
                </dl>
        
                <!--<div class="form_b">
                    <input type="submit" class="btn_blue" id="submit" value="保存">		
                </div>-->
            </form>
        
            </div>
            
        </div>
    </div>
    
</div>

<include file="Public:footext" />
<include file="Member:mfooter" />
<script type="text/javascript" src="__DATA__/FaustCplus/swfobject.js"></script>
<script type="text/javascript" src="__DATA__/FaustCplus/requestTicket.js"></script>
<script type="text/javascript">
var imgUrl = "{$user.face}";
if(imgUrl == ""){
	imgUrl = "__ROOT__/avatar/system/0.gif";
}
function submitForm(path) {
	//alert(path);
	$("#path").val(path);
	$("#altContent").hide();
	$("#upForm").submit();
	$("#TB_closeWindowButton").trigger('click');
}
function uploadevent(status) {
	//alert(status);
	status = status.substring(1);
	if (status && status !== -1) {
		//alert('头像上传成功！');
		submitForm(status);
	} else if (status === -2) {
		alert('头像上传失败!');
		//window.location.href = "#";
	} else {
		$("#TB_closeWindowButton").trigger('click');
	}

}
var flashvars = {
	"jsfunc": "uploadevent",
   	"imgUrl": imgUrl,
	"pid": "75642723",
	"uploadSrc": true,
	"showBrow": true,
	"showCame": true,
	"uploadUrl":"{:U('Member/saveavater')}"
	//"uploadUrl":"__ROOT__/saveavater.php?action=uploadavatar&userid={$uid}"
};
var params = {
	menu: "false",
	scale: "noScale",
	allowFullscreen: "true",
	allowScriptAccess: "always",
	wmode: "transparent",
	bgcolor: "#FFFFFF"
};
var attributes = {
	id: "FaustCplus"
};
swfobject.embedSWF("__DATA__/FaustCplus/FaustCplus.swf", "altContent", "750", "500", "9.0.0", "expressInstall.swf",flashvars,params,attributes);
</script>
</body>
</html>
